package com.magicalcoder.youyamvc.core.service;

import java.util.List;
import java.util.Map;

public interface ICommonMapper<T> {
    T getModel(Map<String, Object> query);
    List<T> getModelList(Map<String, Object> query);
    List<T> getModelInList(Map<String, Object> query);
    Integer getModelListCount(Map<String, Object> query);

    int  insertModel(T model);
    int  replaceModel(T model);
    int updateModel(T model);
    int updateModelWithoutNull(T model);
    int deleteModel(Map<String, Object> query);
    int deleteModelList(Map<String, Object> query);

    void truncateModel();
    int batchInsertModel(List<T> list);
    int batchReplaceModel(List<T> list);
    int batchUpdateModel(List<T> list);
    int batchDeleteModelList(List<T> modelList);
    int batchDeleteModel(List<Long> idList);
}
